/**
 * 技师管理的数据请求
 * @author: minzhang
 * @update: 2017-03-15
 */

import request from '../utils/request';
import qs from 'qs';

export async function query(params) {
	return request(`${CONTEXTPATH}/kbTechnician`, {
    method: 'post',
		credentials: 'include',
		headers: {
			"Content-Type": "application/x-www-form-urlencoded",
		},
    body: qs.stringify(params),
  });
}

export async function create(params) {
  return request(`${CONTEXTPATH}/kbTechnician/save`, {
    method: 'post',
		credentials: 'include',
		headers: {
			"Content-Type": "application/x-www-form-urlencoded",
		},
    body: qs.stringify(params),
  });
}

export async function update(params) {
  return request(`${CONTEXTPATH}/kbTechnician/update`, {
    method: 'post',
		credentials: 'include',
		headers: {
			"Content-Type": "application/x-www-form-urlencoded",
		},
    body: qs.stringify(params),
  });
}

export async function remove(id) {
  return request(`${CONTEXTPATH}/kbTechnician/delete/${id}`, { credentials: 'include' });
}

export async function detail(id) {
  return request(`${CONTEXTPATH}/kbTechnician/edit/${id}`, { credentials: 'include'});
}

export async function setProject(id) {
  return request(`${CONTEXTPATH}/kbTechnician/edit/${id}`, { credentials: 'include'});
}